package com.hs.pre.module.job;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.hs.core.action.BaseAction;
import com.hs.log.HsLogger;
import com.hs.pre.page.PageParam;
import com.hs.pre.page.PageUtil;

 

public class JobAction extends BaseAction{
private static final HsLogger logger = HsLogger.getLogger(JobAction.class.getName());
public ActionForward execute(ActionMapping mapping, ActionForm form,
		HttpServletRequest request, HttpServletResponse response) throws Exception {
	try { 
		 PageParam pageParam = new PageParam(request);
		 pageParam.setPageSize(25);
		 pageParam.setBasePath(request.getContextPath()+"/admin/job.do"); 
		 JobDAO jobDAO = new JobDAO(); 
		 PageUtil pageUtil = jobDAO.getJobList(pageParam); 
		 request.setAttribute("pageUtil", pageUtil); 
		 System.out.println("pageUtil:" + pageUtil);
	} catch (Exception e) {
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
	return mapping.findForward("jobList");
	} 

}
